<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <title>{{config('website.website_title')}}</title>

        <link rel="stylesheet" type="text/css" href="{{config('view.icon.url')}}" />
        <link rel="stylesheet" type="text/css" href="{{asset(config('view.plugin').'/bootstrap/4.3/css/bootstrap.min.css')}}"/>
        {{--    <link rel="stylesheet" href="{{asset(config('mall.pc_assets').'/css/jingdong.css')}}" />--}}
        <link rel="stylesheet" href="{{asset(config('mall.pc_assets').'/css/public.css')}}" />
        <link rel="stylesheet" href="{{asset(config('mall.pc_assets').'/css/header.css')}}" />
        <link rel="stylesheet" href="{{asset(config('mall.pc_assets').'/css/footer.css')}}" />
        <link rel="stylesheet" href="{{asset(config('mall.pc_assets').'/css/goods.css')}}" />
    </head>
<body style="background: white">
<!-- 顶部logo下导航 -->
@include('PShop::public.header')

<div class="index-content" id="index-content">
    {{--    <div class="goods-search">--}}
    {{--        <div class="card">--}}
    {{--            <div class="row no-gutters">--}}
    {{--                <div class="col-md-4 card-header  goods-search-title">--}}
    {{--                    <span>品牌</span>--}}
    {{--                </div>--}}
    {{--                <div class="col-md-8 card-body goods-search-content"><div class="">11222</div></div>--}}
    {{--            </div>--}}
    {{--        </div>--}}
    {{--        <div class="card">--}}
    {{--            <div class="row no-gutters">--}}
    {{--                <div class="col-md-4 card-header goods-search-title">--}}
    {{--                    <span>品牌</span>--}}
    {{--                </div>--}}
    {{--                <div class="col-md-8 card-body  goods-search-content"><div class="">11222</div></div>--}}
    {{--            </div>--}}
    {{--        </div>--}}
    {{--    </div>--}}
    <div class="goods-list" id="goods-list">
        @if($list->isNotEmpty())
            <div class="card mt-2 goods-sort">
                <div class="row no-gutters">
                    <div class="card-header col px-3">
                        <div class="btn-group btn-group-sm mr-2">
                            <button type="button" onclick="goodsSort(0);"
                                    class="btn btn btn-outline-danger @if(!$psort) active @endif"
                            >综合<i class="hcl hcl-paixu"></i>
                            </button>
                            <button type="button" onclick="goodsSort(3);"
                                    class="btn btn btn-outline-danger @if($psort==3) active @endif"
                            >销量<i class="hcl hcl-paixu"></i>
                            </button>
                            <button type="button"
                                    onclick="goodsSort(5);"
                                    class="btn btn btn-outline-danger @if($psort==5) active @endif"
                            >评论<i class="hcl hcl-paixu"></i>
                            </button>
                            <button type="button"
                                    onclick="goodsSort(4);"
                                    class="btn btn btn-outline-danger @if($psort==4) active @endif"
                            >新品<i class="hcl hcl-paixu"></i>
                            </button>
                            <button type="button"
                                    onclick="goodsSort(1);"
                                    class="btn btn btn-outline-danger @if($psort==1) active @endif"
                            >价格<i class="hcl hcl-sort up"></i>
                            </button>
                        </div>
                        <form class="btn-group btn-group-sm goods-price-search" style="width: 240px;align-items: center;">
                            <input type="text" name="min-price" class="form-control col" placeholder="">
                            <span class="mx-1">-</span>
                            <input type="text" name="max-price" class="form-control col" placeholder="">
                            <div class="col">
                                <input type="button" class="btn btn-outline-secondary" onclick="goodsPriceSearch()" value="确定">
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="more-content">
                @php
                    $len = count($list);
                @endphp
                <ul class="more-item">
                    @for($i=0; $i<$len; $i++)
                        @php
                            $item = isset($list[$i])?$list[$i]:$list[rand(0,$len-1)];
                        @endphp
                        <li class="more-list">
                            <a class="flo-shop" target="_blank" href="{{route('f_Pc_Goods_goodsDetails',['goods_id'=>$item['goods_id']])}}">
                                <div class="shop-img">
                                    <img src="{{str_first($item->goods_images)}}" alt="" class="img-shop" />
                                </div>
                                <p class="shop-info">{{$item->goods_name}}</p>
                                <p class="shop-info-price"><i>￥</i><span class="shop-info-price-text">{{$item->price}}</span></p>
                            </a>
                        </li>
                    @endfor
                    {{-- @foreach($list as $item)
                         <li class="more-list">
                             <a class="flo-shop" target="_blank" href="{{route('f_Pc_Goods_goodsDetails',['goods_id'=>$item['goods_id']])}}">
                                 <div class="shop-img">
                                     <img src="{{str_first($item->goods_images)}}" alt="" class="img-shop" />
                                 </div>
                                 <p class="shop-info">{{$item->goods_name}}</p>
                                 <p class="shop-info-price"><i>￥</i><span class="shop-info-price-text">{{$item->price}}</span></p>
                             </a>
                         </li>
                     @endforeach--}}
                </ul>
                <div class="clear"></div>
            </div>
            <div class="more-content">
                {{$list->links('PShop::public.pagination')}}
            </div>
        @endif
    </div>
</div>

@include('PShop::public.footer')
<!-- 顶部悬浮 -->
@include('PShop::index.right_nav')

<script type="text/javascript" src="{{asset(config('view.plugin').'/jquery/jquery-3.2.1.min.js')}}"></script>
<script type="text/javascript" src="{{asset(config('mall.pc_assets').'/js/public.js')}}"></script>
<script type="text/javascript" src="{{asset(config('mall.pc_assets').'/js/goodsList.js')}}"></script>
@stack('scripts')
</body>
</html>